// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.jasmin.unit.math;

import com.dustedpixels.jasmin.unit.Unit;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class Tripod32 implements Unit {
  public int A;
  public int A_Z;
  
  public int B;
  public int B_Z;
  
  public int C;
  public int C_Z;
  
  public void updateEndPoints() {
    int sum = (A & A_Z) | (B & B_Z) | (C & C_Z);
    int sum_Z = A_Z | B_Z | C_Z;
    
    A = (A & A_Z) | (sum & ~A_Z);
    B = (B & B_Z) | (sum & ~B_Z);
    C = (C & C_Z) | (sum & ~C_Z);
    
    A_Z = sum_Z;
    B_Z = sum_Z;
    C_Z = sum_Z;
  }
}
